package org.springframework.boot.netty.listener;

import com.google.common.collect.Collections2;

import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Author: huoxingzhi
 * Date: 2020/12/22
 * Email: hxz_798561819@163.com
 */
public class HandlerMappingAdapter {

    // 完整路径和 方法的 mapping
    private static final Map<String,Object> handleMapping = new ConcurrentHashMap<>(16);

    // 类路径和controller 的 mapping
    private static final Map<String,Object> controllerMapping = new ConcurrentHashMap<>(16);

    protected static Map<String, Object> getHandleMapping() {
        return handleMapping;
    }

    protected static Map<String, Object> getControllerMapping() {
        return controllerMapping;
    }

    public static Map<String, Object> getPublicHandleMapping(){
        return Collections.unmodifiableMap(handleMapping);
    }

    public static Map<String, Object> getPublicControllerMapping() {

        return Collections.unmodifiableMap(controllerMapping);
    }

}
